﻿@{
    Layout = null;
}
<!DOCTYPE html>
@model System.Collections.IEnumerable
<html>
<head>
<title>选择办公用品</title>
      @if (false)
    {
        <script src="../../../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
    }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />

    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/FloatDiv.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>
    
    @Html.DevExpress().GetStyleSheets(

                new StyleSheet { ExtensionType = ExtensionType.GridView, Theme = DevExpressHelper.Theme }

)
    @Html.DevExpress().GetScripts(
                    new Script { ExtensionType = ExtensionType.ListBox }
    )
    <script type="text/javascript">

        function OnBeginCallback(s, e) {
            e.customArgs["command"] = e.command;
            e.customArgs["pageIndex"] = s.pageIndex;
            e.customArgs["pageCount"] = s.pageCount;
            e.customArgs["pageRowSize"] = s.pageRowSize;
            e.customArgs["pageRowCount"] = s.pageRowCount;
            e.customArgs["itemClsNo"] = s.itemClsNo;
            e.customArgs["itemClsNo"] = FItemClsName.GetValue();

        }
        $(document).ready(function () {

            $("#btnClose").bind("click", function () {
                window.close();
            });

            $("#btnOKAndClose").bind("click", function () {
                var linkTypeNos = gvEditing.GetSelectedKeysOnPage();
                if (linkTypeNos.length == 0) {
                    alert("请选择要删除的数据");
                } else {
                    var empNoArray = "";
                    for (var i = 0; i < linkTypeNos.length; i++) {
                        if (empNoArray != "") {
                            empNoArray += "," + linkTypeNos[i];
                        }
                        else {
                            empNoArray += linkTypeNos[i];
                        }
                    }
                }
                window.opener.Show(empNoArray);
                window.close();
            });

            $("#btnOK").bind("click", function () {
                var linkTypeNos = gvEditing.GetSelectedKeysOnPage();
                if (linkTypeNos.length == 0) {
                    alert("请选择要删除的数据");
                } else {
                    var empNoArray = "";
                    for (var i = 0; i < linkTypeNos.length; i++) {
                        if (empNoArray != "") {
                            empNoArray += "," + linkTypeNos[i];
                        }
                        else {
                            empNoArray += linkTypeNos[i];
                        }
                    }
                }

                window.opener.Show(empNoArray);
            });

            $("#btnSelectAll").bind("click", function () {
                gvEditing.SelectAllRowsOnPage();
            });



        });

        function search() {

            
            gvEditing.Refresh();
        }


    </script>
    <script>
        function a() {
       window.opener.Show()
        }
    </script>
</head>
<body>
    <table width="100%" border="0">
        <tr>
            <td style="color: #CC0000;font-weight: bold;font-size: 22px;text-align:center;">选择办公用品</td>
        </tr>
        <tr>	
            <td align="right">
            @Html.DevExpress().Button(settings =>
                    {
                        settings.Name = "btnClose";
                        settings.Text = "关闭";
                        settings.ControlStyle.CssClass = "right";
                        //settings.Images.Image.Url = Url.Content("~/Content/ControlImages/item.png");
                     }).GetHtml() 

                      @Html.DevExpress().Button(settings =>
                    {
                        settings.Name = "btnOKAndClose";
                        settings.Text = "确定并关闭";
                        settings.ControlStyle.CssClass = "right";
                        //settings.Images.Image.Url = Url.Content("~/Content/ControlImages/item.png");
                     }).GetHtml() 

                      @Html.DevExpress().Button(settings =>
                    {
                        settings.Name = "btnOK";
                        settings.Text = "确定";
                        settings.ControlStyle.CssClass = "right";
                        //settings.Images.Image.Url = Url.Content("~/Content/ControlImages/item.png");
                     }).GetHtml()
                 
                @Html.DevExpress().Button(settings =>
                    {
                        settings.Name = "btnSelectAll";
                        settings.Text = "全选";
                        settings.ControlStyle.CssClass = "right";
                        //settings.Images.Image.Url = Url.Content("~/Content/ControlImages/item.png");
                     }).GetHtml()
                        
	            @Html.DevExpress().ComboBox(settings =>
                    {
                        settings.Name = "FItemClsName";
                        settings.Properties.DropDownStyle = DropDownStyle.DropDownList;
                        settings.Enabled = true;
                        settings.Properties.TextField = "Text";
                        settings.Properties.ValueField = "Value";
                        settings.Width = 100;
                        settings.ControlStyle.CssClass = "right";
                        settings.Properties.ClientSideEvents.ValueChanged = "function(s,e){search()}";
                    }).BindList(ViewData["clsNoList"]).Bind(ViewData["itemClsNo"]).GetHtml()
                                    
                </td>	
            </tr>
    </table>
           <div>
              @Html.Partial("OfficeItemManagerDialogPartial", Model)
           </div>
</body>
</html>
